import random
import cv2
def light_and_dark(img):
    sample_alpha = [0.3,0.4,0.5,0.6,0.7,1.3,1.5,2,2.5,3]
    alpha = random.sample(sample_alpha,k=1)[-1] 
    sample_beta = [-20,-10,5,15,25,35]
    beta = random.sample(sample_beta,k=1)[-1] 
    img_scaled = cv2.convertScaleAbs(img, alpha=alpha,beta=beta) 
    return img_scaled 